0

titanic data .ipynb

No Headings

The table of contents shows headings in notebooks and supported files.

Skip to Main
Jupyter

titanic data

Last Checkpoint: 11 seconds ago
  • File
  • Edit
  • View
  • Run
  • Kernel
  • Settings
  • Help
JupyterLab
Python [conda env:base]
Kernel status: Idle
image/svg+xml
    [1]:
    import pandas as pd
    import numpy as np
    import matplotlib.pyplot as plt
    import seaborn as sns
    [3]:
    df_train=pd.read_csv("C:/Users/rish2/Downloads/archive/train.csv")
    df_test=pd.read_csv("C:/Users/rish2/Downloads/archive/test.csv")
    df=pd.concat((df_train,df_test), sort=False)
    [5]:
    import warnings
    warnings.filterwarnings('ignore')
    [7]:
    df_train
    [7]:
    PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    0 1 0 3 Braund, Mr. Owen Harris male 22.0 1 0 A/5 21171 7.2500 NaN S
    1 2 1 1 Cumings, Mrs. John Bradley (Florence Briggs Th... female 38.0 1 0 PC 17599 71.2833 C85 C
    2 3 1 3 Heikkinen, Miss. Laina female 26.0 0 0 STON/O2. 3101282 7.9250 NaN S
    3 4 1 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35.0 1 0 113803 53.1000 C123 S
    4 5 0 3 Allen, Mr. William Henry male 35.0 0 0 373450 8.0500 NaN S
    ... ... ... ... ... ... ... ... ... ... ... ... ...
    886 887 0 2 Montvila, Rev. Juozas male 27.0 0 0 211536 13.0000 NaN S
    887 888 1 1 Graham, Miss. Margaret Edith female 19.0 0 0 112053 30.0000 B42 S
    888 889 0 3 Johnston, Miss. Catherine Helen "Carrie" female NaN 1 2 W./C. 6607 23.4500 NaN S
    889 890 1 1 Behr, Mr. Karl Howell male 26.0 0 0 111369 30.0000 C148 C
    890 891 0 3 Dooley, Mr. Patrick male 32.0 0 0 370376 7.7500 NaN Q

    891 rows × 12 columns

    [9]:
    df_test
    [9]:
    PassengerId Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    0 892 3 Kelly, Mr. James male 34.5 0 0 330911 7.8292 NaN Q
    1 893 3 Wilkes, Mrs. James (Ellen Needs) female 47.0 1 0 363272 7.0000 NaN S
    2 894 2 Myles, Mr. Thomas Francis male 62.0 0 0 240276 9.6875 NaN Q
    3 895 3 Wirz, Mr. Albert male 27.0 0 0 315154 8.6625 NaN S
    4 896 3 Hirvonen, Mrs. Alexander (Helga E Lindqvist) female 22.0 1 1 3101298 12.2875 NaN S
    ... ... ... ... ... ... ... ... ... ... ... ...
    413 1305 3 Spector, Mr. Woolf male NaN 0 0 A.5. 3236 8.0500 NaN S
    414 1306 1 Oliva y Ocana, Dona. Fermina female 39.0 0 0 PC 17758 108.9000 C105 C
    415 1307 3 Saether, Mr. Simon Sivertsen male 38.5 0 0 SOTON/O.Q. 3101262 7.2500 NaN S
    416 1308 3 Ware, Mr. Frederick male NaN 0 0 359309 8.0500 NaN S
    417 1309 3 Peter, Master. Michael J male NaN 1 1 2668 22.3583 NaN C

    418 rows × 11 columns

    [11]:
    df=df.reset_index(drop=True)
    [13]:
    PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    0 1 0.0 3 Braund, Mr. Owen Harris male 22.0 1 0 A/5 21171 7.2500 NaN S
    1 2 1.0 1 Cumings, Mrs. John Bradley (Florence Briggs Th... female 38.0 1 0 PC 17599 71.2833 C85 C
    2 3 1.0 3 Heikkinen, Miss. Laina female 26.0 0 0 STON/O2. 3101282 7.9250 NaN S
    3 4 1.0 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35.0 1 0 113803 53.1000 C123 S
    4 5 0.0 3 Allen, Mr. William Henry male 35.0 0 0 373450 8.0500 NaN S
    [15]:
    PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    1304 1305 NaN 3 Spector, Mr. Woolf male NaN 0 0 A.5. 3236 8.0500 NaN S
    1305 1306 NaN 1 Oliva y Ocana, Dona. Fermina female 39.0 0 0 PC 17758 108.9000 C105 C
    1306 1307 NaN 3 Saether, Mr. Simon Sivertsen male 38.5 0 0 SOTON/O.Q. 3101262 7.2500 NaN S
    1307 1308 NaN 3 Ware, Mr. Frederick male NaN 0 0 359309 8.0500 NaN S
    1308 1309 NaN 3 Peter, Master. Michael J male NaN 1 1 2668 22.3583 NaN C
    <class 'pandas.core.frame.DataFrame'>
    RangeIndex: 1309 entries, 0 to 1308
    Data columns (total 12 columns):
     #   Column       Non-Null Count  Dtype  
    ---  ------       --------------  -----  
     0   PassengerId  1309 non-null   int64  
     1   Survived     891 non-null    float64
     2   Pclass       1309 non-null   int64  
     3   Name         1309 non-null   object 
     4   Sex          1309 non-null   object 
     5   Age          1046 non-null   float64
     6   SibSp        1309 non-null   int64  
     7   Parch        1309 non-null   int64  
     8   Ticket       1309 non-null   object 
     9   Fare         1308 non-null   float64
     10  Cabin        295 non-null    object 
     11  Embarked     1307 non-null   object 
    dtypes: float64(3), int64(4), object(5)
    memory usage: 122.8+ KB
    
    [19]:
    PassengerId       0
    Survived        418
    Pclass            0
    Name              0
    Sex               0
    Age             263
    SibSp             0
    Parch             0
    Ticket            0
    Fare              1
    Cabin          1014
    Embarked          2
    dtype: int64
    [21]:
    PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    0 1 0.0 3 Braund, Mr. Owen Harris male 22.0 1 0 A/5 21171 7.2500 NaN S
    1 2 1.0 1 Cumings, Mrs. John Bradley (Florence Briggs Th... female 38.0 1 0 PC 17599 71.2833 C85 C
    2 3 1.0 3 Heikkinen, Miss. Laina female 26.0 0 0 STON/O2. 3101282 7.9250 NaN S
    3 4 1.0 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35.0 1 0 113803 53.1000 C123 S
    4 5 0.0 3 Allen, Mr. William Henry male 35.0 0 0 373450 8.0500 NaN S
    ... ... ... ... ... ... ... ... ... ... ... ... ...
    886 887 0.0 2 Montvila, Rev. Juozas male 27.0 0 0 211536 13.0000 NaN S
    887 888 1.0 1 Graham, Miss. Margaret Edith female 19.0 0 0 112053 30.0000 B42 S
    888 889 0.0 3 Johnston, Miss. Catherine Helen "Carrie" female NaN 1 2 W./C. 6607 23.4500 NaN S
    889 890 1.0 1 Behr, Mr. Karl Howell male 26.0 0 0 111369 30.0000 C148 C
    890 891 0.0 3 Dooley, Mr. Patrick male 32.0 0 0 370376 7.7500 NaN Q

    891 rows × 12 columns

    [23]:
    PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    891 892 NaN 3 Kelly, Mr. James male 34.5 0 0 330911 7.8292 NaN Q
    892 893 NaN 3 Wilkes, Mrs. James (Ellen Needs) female 47.0 1 0 363272 7.0000 NaN S
    893 894 NaN 2 Myles, Mr. Thomas Francis male 62.0 0 0 240276 9.6875 NaN Q
    894 895 NaN 3 Wirz, Mr. Albert male 27.0 0 0 315154 8.6625 NaN S
    895 896 NaN 3 Hirvonen, Mrs. Alexander (Helga E Lindqvist) female 22.0 1 1 3101298 12.2875 NaN S
    ... ... ... ... ... ... ... ... ... ... ... ... ...
    1304 1305 NaN 3 Spector, Mr. Woolf male NaN 0 0 A.5. 3236 8.0500 NaN S
    1305 1306 NaN 1 Oliva y Ocana, Dona. Fermina female 39.0 0 0 PC 17758 108.9000 C105 C
    1306 1307 NaN 3 Saether, Mr. Simon Sivertsen male 38.5 0 0 SOTON/O.Q. 3101262 7.2500 NaN S
    1307 1308 NaN 3 Ware, Mr. Frederick male NaN 0 0 359309 8.0500 NaN S
    1308 1309 NaN 3 Peter, Master. Michael J male NaN 1 1 2668 22.3583 NaN C

    418 rows × 12 columns

    [25]:
    PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    0 1 0.0 3 Braund, Mr. Owen Harris male 22.0 1 0 A/5 21171 7.2500 NaN S
    1 2 1.0 1 Cumings, Mrs. John Bradley (Florence Briggs Th... female 38.0 1 0 PC 17599 71.2833 C85 C
    2 3 1.0 3 Heikkinen, Miss. Laina female 26.0 0 0 STON/O2. 3101282 7.9250 NaN S
    3 4 1.0 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35.0 1 0 113803 53.1000 C123 S
    4 5 0.0 3 Allen, Mr. William Henry male 35.0 0 0 373450 8.0500 NaN S
    ... ... ... ... ... ... ... ... ... ... ... ... ...
    1304 1305 NaN 3 Spector, Mr. Woolf male NaN 0 0 A.5. 3236 8.0500 NaN S
    1305 1306 NaN 1 Oliva y Ocana, Dona. Fermina female 39.0 0 0 PC 17758 108.9000 C105 C
    1306 1307 NaN 3 Saether, Mr. Simon Sivertsen male 38.5 0 0 SOTON/O.Q. 3101262 7.2500 NaN S
    1307 1308 NaN 3 Ware, Mr. Frederick male NaN 0 0 359309 8.0500 NaN S
    1308 1309 NaN 3 Peter, Master. Michael J male NaN 1 1 2668 22.3583 NaN C

    1309 rows × 12 columns

    [27]:
    PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    count 1309.000000 891.000000 1309.000000 1309 1309 1046.000000 1309.000000 1309.000000 1309 1308.000000 295 1307
    unique NaN NaN NaN 1307 2 NaN NaN NaN 929 NaN 186 3
    top NaN NaN NaN Connolly, Miss. Kate male NaN NaN NaN CA. 2343 NaN C23 C25 C27 S
    freq NaN NaN NaN 2 843 NaN NaN NaN 11 NaN 6 914
    mean 655.000000 0.383838 2.294882 NaN NaN 29.881138 0.498854 0.385027 NaN 33.295479 NaN NaN
    std 378.020061 0.486592 0.837836 NaN NaN 14.413493 1.041658 0.865560 NaN 51.758668 NaN NaN
    min 1.000000 0.000000 1.000000 NaN NaN 0.170000 0.000000 0.000000 NaN 0.000000 NaN NaN
    25% 328.000000 0.000000 2.000000 NaN NaN 21.000000 0.000000 0.000000 NaN 7.895800 NaN NaN
    50% 655.000000 0.000000 3.000000 NaN NaN 28.000000 0.000000 0.000000 NaN 14.454200 NaN NaN
    75% 982.000000 1.000000 3.000000 NaN NaN 39.000000 1.000000 0.000000 NaN 31.275000 NaN NaN
    max 1309.000000 1.000000 3.000000 NaN NaN 80.000000 8.000000 9.000000 NaN 512.329200 NaN NaN
    [29]:
    0                                 Braund, Mr. Owen Harris
    1       Cumings, Mrs. John Bradley (Florence Briggs Th...
    2                                  Heikkinen, Miss. Laina
    3            Futrelle, Mrs. Jacques Heath (Lily May Peel)
    4                                Allen, Mr. William Henry
                                  ...                        
    1304                                   Spector, Mr. Woolf
    1305                         Oliva y Ocana, Dona. Fermina
    1306                         Saether, Mr. Simon Sivertsen
    1307                                  Ware, Mr. Frederick
    1308                             Peter, Master. Michael J
    Name: Name, Length: 1309, dtype: object
    [31]:
    Name Survived
    0 Braund, Mr. Owen Harris 0.0
    1 Cumings, Mrs. John Bradley (Florence Briggs Th... 1.0
    2 Heikkinen, Miss. Laina 1.0
    3 Futrelle, Mrs. Jacques Heath (Lily May Peel) 1.0
    4 Allen, Mr. William Henry 0.0
    ... ... ...
    1304 Spector, Mr. Woolf NaN
    1305 Oliva y Ocana, Dona. Fermina NaN
    1306 Saether, Mr. Simon Sivertsen NaN
    1307 Ware, Mr. Frederick NaN
    1308 Peter, Master. Michael J NaN

    1309 rows × 2 columns

    [33]:
    (80.0, 0.17, np.float64(29.881137667304014))
    [37]:
    1      Cumings, Mrs. John Bradley (Florence Briggs Th...
    2                                 Heikkinen, Miss. Laina
    3           Futrelle, Mrs. Jacques Heath (Lily May Peel)
    8      Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg)
    9                    Nasser, Mrs. Nicholas (Adele Achem)
                                 ...                        
    875                     Najib, Miss. Adele Kiamie "Jane"
    879        Potter, Mrs. Thomas Jr (Lily Alexenia Wilson)
    880         Shelley, Mrs. William (Imanita Parrish Hall)
    887                         Graham, Miss. Margaret Edith
    889                                Behr, Mr. Karl Howell
    Name: Name, Length: 342, dtype: object
    [39]:
    <Axes: >
    [41]:
    0       False
    1        True
    2        True
    3        True
    4       False
            ...  
    1304    False
    1305    False
    1306    False
    1307    False
    1308    False
    Name: Survived, Length: 1309, dtype: bool
    [43]:
    array(['male', 'female'], dtype=object)
    [45]:
    Sex
    male      843
    female    466
    Name: count, dtype: int64
    [47]:
    Sex
    male      0.644003
    female    0.355997
    Name: proportion, dtype: float64
    [49]:
    <Axes: ylabel='proportion'>
    [51]:
    <Axes: xlabel='Sex,Survived'>
    [53]:
    Sex     Survived
    female  1.0         0.742038
            0.0         0.257962
    male    0.0         0.811092
            1.0         0.188908
    Name: proportion, dtype: float64
    [57]:
    array([3, 1, 2])
    [61]:
    Pclass  Survived
    1       1.0         0.629630
            0.0         0.370370
    2       0.0         0.527174
            1.0         0.472826
    3       0.0         0.757637
            1.0         0.242363
    Name: proportion, dtype: float64
    [63]:
    Sex     Pclass  Survived
    female  1       1.0         0.968085
                    0.0         0.031915
            2       1.0         0.921053
                    0.0         0.078947
            3       0.0         0.500000
                    1.0         0.500000
    male    1       0.0         0.631148
                    1.0         0.368852
            2       0.0         0.842593
                    1.0         0.157407
            3       0.0         0.864553
                    1.0         0.135447
    Name: proportion, dtype: float64
    [65]:
    PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    1245 1246 NaN 3 Dean, Miss. Elizabeth Gladys Millvina"" female 0.17 1 2 C.A. 2315 20.575 NaN S
    [67]:
    PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    630 631 1.0 1 Barkworth, Mr. Algernon Henry Wilson male 80.0 0 0 27042 30.0 A23 S
    [69]:
    PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
    96 97 0.0 1 Goldschmidt, Mr. George B male 71.0 0 0 PC 17754 34.6542 A5 C
    116 117 0.0 3 Connors, Mr. Patrick male 70.5 0 0 370369 7.7500 NaN Q
    493 494 0.0 1 Artagaveytia, Mr. Ramon male 71.0 0 0 PC 17609 49.5042 NaN C
    630 631 1.0 1 Barkworth, Mr. Algernon Henry Wilson male 80.0 0 0 27042 30.0000 A23 S
    672 673 0.0 2 Mitchell, Mr. Henry Michael male 70.0 0 0 C.A. 24580 10.5000 NaN S
    745 746 0.0 1 Crosby, Capt. Edward Gifford male 70.0 1 1 WE/P 5735 71.0000 B22 S
    851 852 0.0 3 Svensson, Mr. Johan male 74.0 0 0 347060 7.7750 NaN S
    987 988 NaN 1 Cavendish, Mrs. Tyrell William (Julia Florence... female 76.0 1 0 19877 78.8500 C46 S
    [71]:
    Embarked
    S    0.699311
    C    0.206580
    Q    0.094109
    Name: proportion, dtype: float64
    [73]:
    Embarked  Survived
    C         1.0         0.553571
              0.0         0.446429
    Q         0.0         0.610390
              1.0         0.389610
    S         0.0         0.663043
              1.0         0.336957
    Name: proportion, dtype: float64
    [75]:
    0                                 Braund, Mr. Owen Harris
    1       Cumings, Mrs. John Bradley (Florence Briggs Th...
    2                                  Heikkinen, Miss. Laina
    3            Futrelle, Mrs. Jacques Heath (Lily May Peel)
    4                                Allen, Mr. William Henry
                                  ...                        
    1304                                   Spector, Mr. Woolf
    1305                         Oliva y Ocana, Dona. Fermina
    1306                         Saether, Mr. Simon Sivertsen
    1307                                  Ware, Mr. Frederick
    1308                             Peter, Master. Michael J
    Name: Name, Length: 1309, dtype: object
    [79]:
    0           Mr
    1          Mrs
    2         Miss
    3          Mrs
    4           Mr
             ...  
    1304        Mr
    1305      Dona
    1306        Mr
    1307        Mr
    1308    Master
    Name: Title, Length: 1309, dtype: object
    [81]:
    array(['Mr', 'Mrs', 'Miss', 'Master', 'Don', 'Rev', 'Dr', 'Mme', 'Ms',
           'Major', 'Lady', 'Sir', 'Mlle', 'Col', 'Capt', 'Countess',
           'Jonkheer', 'Dona'], dtype=object)
    [85]:
    array(['Mr', 'Mrs', 'Miss', 'Master'], dtype=object)
    [87]:
    Name    van Billiard, Master. Walter John
    Age                                  14.5
    dtype: object
    [89]:
    Title
    Master     5.482642
    Miss      21.824366
    Mr        32.811056
    Mrs       36.971264
    Name: Age, dtype: float64
    [91]:
    Survived Pclass Sex Age SibSp Parch Fare Embarked Title
    0 0.0 3 male 22.0 1 0 7.2500 S Mr
    1 1.0 1 female 38.0 1 0 71.2833 C Mrs
    2 1.0 3 female 26.0 0 0 7.9250 S Miss
    3 1.0 1 female 35.0 1 0 53.1000 S Mrs
    4 0.0 3 male 35.0 0 0 8.0500 S Mr
    ... ... ... ... ... ... ... ... ... ...
    1304 NaN 3 male NaN 0 0 8.0500 S Mr
    1305 NaN 1 female 39.0 0 0 108.9000 C Mrs
    1306 NaN 3 male 38.5 0 0 7.2500 S Mr
    1307 NaN 3 male NaN 0 0 8.0500 S Mr
    1308 NaN 3 male NaN 1 1 22.3583 C Master

    1309 rows × 9 columns

    [93]:
    Survived    418
    Pclass        0
    Sex           0
    Age         263
    SibSp         0
    Parch         0
    Fare          1
    Embarked      2
    Title         0
    dtype: int64
    [97]:
    Survived    418
    Pclass        0
    Sex           0
    Age           0
    SibSp         0
    Parch         0
    Fare          1
    Embarked      2
    Title         0
    dtype: int64
    [99]:
    Pclass
    1    87.508992
    2    21.179196
    3    13.302889
    Name: Fare, dtype: float64
    [103]:
    Survived    418
    Pclass        0
    Sex           0
    Age           0
    SibSp         0
    Parch         0
    Fare          0
    Embarked      2
    Title         0
    dtype: int64
    [105]:
    Embarked
    S    914
    C    270
    Q    123
    Name: count, dtype: int64
    [109]:
    Survived    418
    Pclass        0
    Sex           0
    Age           0
    SibSp         0
    Parch         0
    Fare          0
    Embarked      0
    Title         0
    dtype: int64
    <class 'pandas.core.frame.DataFrame'>
    RangeIndex: 1309 entries, 0 to 1308
    Data columns (total 9 columns):
     #   Column    Non-Null Count  Dtype  
    ---  ------    --------------  -----  
     0   Survived  891 non-null    float64
     1   Pclass    1309 non-null   int64  
     2   Sex       1309 non-null   object 
     3   Age       1309 non-null   float64
     4   SibSp     1309 non-null   int64  
     5   Parch     1309 non-null   int64  
     6   Fare      1309 non-null   float64
     7   Embarked  1309 non-null   object 
     8   Title     1309 non-null   object 
    dtypes: float64(3), int64(3), object(3)
    memory usage: 92.2+ KB
    
    [113]:
    0       C
    1       A
    2       C
    3       A
    4       C
           ..
    1304    C
    1305    A
    1306    C
    1307    C
    1308    C
    Name: Pclass, Length: 1309, dtype: object
    <class 'pandas.core.frame.DataFrame'>
    RangeIndex: 1309 entries, 0 to 1308
    Data columns (total 9 columns):
     #   Column    Non-Null Count  Dtype  
    ---  ------    --------------  -----  
     0   Survived  891 non-null    float64
     1   Pclass    1309 non-null   object 
     2   Sex       1309 non-null   object 
     3   Age       1309 non-null   float64
     4   SibSp     1309 non-null   int64  
     5   Parch     1309 non-null   int64  
     6   Fare      1309 non-null   float64
     7   Embarked  1309 non-null   object 
     8   Title     1309 non-null   object 
    dtypes: float64(3), int64(2), object(4)
    memory usage: 92.2+ KB
    

    -

    Variables

    Callstack

      Breakpoints

      Source

      9
      1

      Kernel Sources

      Common Tools
      No metadata.
      Advanced Tools
      No metadata.
      Anaconda Assistant
      AI-powered coding, insights and debugging in your notebooks.
      To enable the following extensions, create an account or sign in.
      • Anaconda Assistant
        4.1.0
      • Coming soon!
      • Data Catalogs
      • Panel Deployments
      • Sharing
      Already have an account? Sign In
      For more information, read our Anaconda Assistant documentation.
      Alt+[
      Alt+]
      Alt+End
      • Assistant
      • Open Anaconda Assistant
        Ctrl+Shift+A
      • Console
      • Change Kernel…
      • Clear Console Cells
      • Close and Shut Down…
      • Insert Line Break
      • Interrupt Kernel
      • New Console
      • Restart Kernel…
      • Run Cell (forced)
      • Run Cell (unforced)
      • Show All Kernel Activity
      • Debugger
      • Breakpoints on exception
      • Evaluate Code
        Evaluate Code
      • Next
        Next
        F10
      • Pause
        Pause
        F9
      • Step In
        Step In
        F11
      • Step Out
        Step Out
        Shift+F11
      • Terminate
        Terminate
        Shift+F9
      • Display Languages
      • English
        English
      • File Operations
      • Autosave Documents
      • Download
        Download the file to your computer
      • Reload Notebook from Disk
        Reload contents from disk
      • Revert Notebook to Checkpoint…
        Revert contents to previous checkpoint
      • Save Notebook
        Save and create checkpoint
        Ctrl+S
      • Save Notebook As…
        Save with new path
        Ctrl+Shift+S
      • Trust HTML File
        Whether the HTML file is trusted. Trusting the file allows scripts to run in it, which may result in security risks. Only enable for files you trust.
      • Help
      • About Jupyter Notebook
      • Jupyter Reference
      • JupyterLab FAQ
      • JupyterLab Reference
      • Launch Jupyter Notebook File Browser
      • Markdown Reference
      • Show Keyboard Shortcuts…
        Show relevant keyboard shortcuts for the current active widget
        Ctrl+Shift+H
      • Image Viewer
      • Flip image horizontally
        H
      • Flip image vertically
        V
      • Invert Colors
        I
      • Reset Image
        0
      • Rotate Clockwise
        ]
      • Rotate Counterclockwise
        [
      • Zoom In
        =
      • Zoom Out
        -
      • Kernel Operations
      • Shut Down All Kernels…
      • Main Area
      • Close All Other Tabs
      • Close Tab
        Alt+W
      • Close Tabs to Right
      • End Search
        Esc
      • Find Next
        Ctrl+G
      • Find Previous
        Ctrl+Shift+G
      • Find…
        Ctrl+F
      • Log Out
        Log out of Jupyter Notebook
      • Search in Selection
        Alt+L
      • Shut Down
        Shut down Jupyter Notebook
      • Mode
      • Toggle Zen Mode
      • Notebook Cell Operations
      • Change to Code Cell Type
        Y
      • Change to Heading 1
        1
      • Change to Heading 2
        2
      • Change to Heading 3
        3
      • Change to Heading 4
        4
      • Change to Heading 5
        5
      • Change to Heading 6
        6
      • Change to Markdown Cell Type
        M
      • Change to Raw Cell Type
        R
      • Clear Cell Output
        Clear outputs for the selected cells
      • Collapse All Code
      • Collapse All Outputs
      • Collapse Selected Code
      • Collapse Selected Outputs
      • Copy Cell
        Copy this cell
        C
      • Cut Cell
        Cut this cell
        X
      • Delete Cell
        Delete this cell
        D, D
      • Disable Scrolling for Outputs
      • Enable Scrolling for Outputs
      • Expand All Code
      • Expand All Outputs
      • Expand Selected Code
      • Expand Selected Outputs
      • Extend Selection Above
        Shift+K
      • Extend Selection Below
        Shift+J
      • Extend Selection to Bottom
        Shift+End
      • Extend Selection to Top
        Shift+Home
      • Insert Cell Above
        Insert a cell above
        A
      • Insert Cell Below
        Insert a cell below
        B
      • Insert Heading Above Current Heading
        Shift+A
      • Insert Heading Below Current Heading
        Shift+B
      • Merge Cell Above
        Ctrl+Backspace
      • Merge Cell Below
        Ctrl+Shift+M
      • Merge Selected Cells
        Shift+M
      • Move Cell Down
        Move this cell down
        Ctrl+Shift+Down
      • Move Cell Up
        Move this cell up
        Ctrl+Shift+Up
      • Paste Cell Above
        Paste this cell from the clipboard
      • Paste Cell and Replace
      • Paste Cell Below
        Paste this cell from the clipboard
        V
      • Redo Cell Operation
        Shift+Z
      • Render Side-by-Side
        Shift+R
      • Run Selected Cell
        Run this cell and advance
        Shift+Enter
      • Run Selected Cell and Do not Advance
        Ctrl+Enter
      • Run Selected Cell and Insert Below
        Alt+Enter
      • Run Selected Text or Current Line in Console
      • Select Cell Above
        K
      • Select Cell Below
        J
      • Select Heading Above or Collapse Heading
        Left
      • Select Heading Below or Expand Heading
        Right
      • Set side-by-side ratio
      • Split Cell
        Ctrl+Shift+-
      • Undo Cell Operation
        Z
      • Notebook Operations
      • Access Next Kernel History Entry
        Alt+Down
      • Access Previous Kernel History Entry
        Alt+Up
      • Change Kernel…
      • Clear Outputs of All Cells
        Clear all outputs of all cells
      • Close and Shut Down Notebook…
      • Collapse All Headings
        Ctrl+Shift+Left
      • Deselect All Cells
      • Edit Notebook Metadata
      • Enter Command Mode
        Ctrl+M
      • Enter Edit Mode
        Enter
      • Expand All Headings
        Ctrl+Shift+Right
      • Interrupt Kernel
        Interrupt the kernel
      • New Console for Notebook
      • New Notebook
        Create a new notebook
      • Open with Panel in New Browser Tab
      • Preview Notebook with Panel
      • Reconnect to Kernel
      • Render All Markdown Cells
      • Restart Kernel and Clear Outputs of All Cells…
        Restart the kernel and clear all outputs of all cells
      • Restart Kernel and Debug…
        Restart Kernel and Debug…
      • Restart Kernel and Run All Cells…
        Restart the kernel and run all cells
      • Restart Kernel and Run up to Selected Cell…
      • Restart Kernel…
        Restart the kernel
      • Run All Above Selected Cell
      • Run All Cells
        Run all cells
      • Run Selected Cell and All Below
      • Save and Export Notebook: Asciidoc
      • Save and Export Notebook: Executable Script
      • Save and Export Notebook: HTML
      • Save and Export Notebook: LaTeX
      • Save and Export Notebook: Markdown
      • Save and Export Notebook: PDF
      • Save and Export Notebook: Qtpdf
      • Save and Export Notebook: Qtpng
      • Save and Export Notebook: ReStructured Text
      • Save and Export Notebook: Reveal.js Slides
      • Save and Export Notebook: Webpdf
      • Select All Cells
        Ctrl+A
      • Show Line Numbers
      • Toggle Collapse Notebook Heading
      • Trust Notebook
      • Other
      • Open in JupyterLab
        JupyterLab
      • Plugin Manager
      • Advanced Plugin Manager
      • Terminal
      • Decrease Terminal Font Size
      • Increase Terminal Font Size
      • New Terminal
        Start a new terminal session
      • Refresh Terminal
        Refresh the current terminal session
      • Use Terminal Theme: Dark
        Set the terminal theme
      • Use Terminal Theme: Inherit
        Set the terminal theme
      • Use Terminal Theme: Light
        Set the terminal theme
      • Text Editor
      • Decrease Font Size
      • Increase Font Size
      • New Markdown File
        Create a new markdown file
      • New Python File
        Create a new Python file
      • New Text File
        Create a new text file
      • Spaces: 1
      • Spaces: 2
      • Spaces: 4
      • Spaces: 4
      • Spaces: 8
      • Theme
      • Decrease Code Font Size
      • Decrease Content Font Size
      • Decrease UI Font Size
      • Increase Code Font Size
      • Increase Content Font Size
      • Increase UI Font Size
      • Set Preferred Dark Theme: JupyterLab Dark
      • Set Preferred Dark Theme: JupyterLab Dark High Contrast
      • Set Preferred Dark Theme: JupyterLab Light
      • Set Preferred Light Theme: JupyterLab Dark
      • Set Preferred Light Theme: JupyterLab Dark High Contrast
      • Set Preferred Light Theme: JupyterLab Light
      • Synchronize Styling Theme with System Settings
      • Theme Scrollbars
      • Use Theme: JupyterLab Dark
      • Use Theme: JupyterLab Dark High Contrast
      • Use Theme: JupyterLab Light
      • View
      • File Browser
      • Open JupyterLab
      • Show Anaconda Assistant
        Show Show Anaconda Assistant in the right sidebar
      • Show Debugger
        Show Show Debugger in the right sidebar
      • Show Header
      • Show Notebook Tools
        Show Show Notebook Tools in the right sidebar
      • Show Table of Contents
        Show Show Table of Contents in the left sidebar